using System.Collections;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

public class GonerMenu : MonoBehaviour
{
	[SerializeField]
	public Vector2 TargetSoulPosition;

	[SerializeField]
	private float SoulLerpSpeed;

	[SerializeField]
	private Transform SoulTransform;

	[SerializeField]
	private Material UnselectedGonerMaterial;

	[SerializeField]
	private Material SelectedGonerMaterial;

	private SettingsManager Settings;

	public AudioSource GonerMenuSource;

	private Animator GonerMenuAnimator;

	private AudioReverbPreset PreviousPreset;

	private MusicManager GameMusic;

	private AudioReverbFilter PlayerReverbFilter;

	private PlayerManager Kris;

	private bool PreviousAnimationState;

	private float PreviousMusicVolume;

	private ChatboxManager ChatboxManager;

	private bool PreviousChatboxInputState;

	public Image CMenu_SoulIcon;

	private LightworldMenu LWMenu;

	private bool PreviousLWMenuInputState;

	public bool gonerMenuWasOpen;

	private bool PreviousPlayerInteractionState;

	private TRIG_LEVELTRANSITION ReturnToMenu;

	[SerializeField]
	private AudioClip[] GonerMenuClips;

	[SerializeReference]
	private RuntimeAnimatorController DefaultLightworldKrisRuntimeController;

	[SerializeReference]
	private RuntimeAnimatorController DefaultDarkworldKrisRuntimeController;

	[SerializeField]
	private TextMeshProUGUI TipText;

	[SerializeField]
	private TextMeshProUGUI MusicText;

	[SerializeField]
	private TextMeshProUGUI CashText;

	[SerializeField]
	private AudioClip CashgainSFX;

	[SerializeField]
	private TextMeshProUGUI CurrentQuestsText;

	[Space(5f)]
	public static Hypothesis CurrentActiveHypothesis;

	[Space(5f)]
	public bool GonerMenuOpen;

	public bool CanOpenGonerMenu;

	public string CurrentMenuState = "Default";

	public int CurrentCursorPosition;

	private int CurrentCursorMax;

	private int CurrentCursorMin;

	private bool UseHorizontalControls;

	private bool XReturnDebounce;

	private bool HasRanXReturnDebounce;

	public static bool RecoveringFromGameOver;

	[Header("Base Menu References")]
	[SerializeField]
	private Transform[] BaseMenuOptions;

	[SerializeField]
	private Color[] BaseMenuOptionsColors;

	[SerializeField]
	private TextMeshProUGUI[] BaseMenuTexts;

	[SerializeField]
	private GameObject RestartBattleOption;

	[Header("Settings Menu References")]
	[SerializeField]
	private GonerMenu_Settings SettingsMenu;

	[Header("Return Menu References")]
	[SerializeField]
	private Transform ReturnWarningMenu;

	[SerializeField]
	private Transform[] ReturnWarningOptions;

	[SerializeField]
	private TextMeshProUGUI[] ReturnWarningText;

	[Header("Restart Menu References")]
	[SerializeField]
	private Transform RestartWarningMenu;

	[SerializeField]
	private Transform[] RestartWarningOptions;

	[SerializeField]
	private TextMeshProUGUI[] RestartWarningText;

	private static GonerMenu instance;

	public static GonerMenu Instance => instance;

	private void Awake()
	{
		if ((Object)(object)instance != (Object)null && (Object)(object)instance != (Object)(object)this)
		{
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}
		else
		{
			instance = this;
		}
	}

	private void Start()
	{
		CurrentMenuState = "Default";
		GonerMenuSource = ((Component)this).GetComponent<AudioSource>();
		GonerMenuAnimator = ((Component)this).GetComponent<Animator>();
		ChatboxManager = Object.FindFirstObjectByType<ChatboxManager>();
		GameMusic = MusicManager.Instance;
		ReturnToMenu = ((Component)this).GetComponent<TRIG_LEVELTRANSITION>();
	}

	private void Update()
	{
		//IL_00af: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: Unknown result type (might be due to invalid IL or missing references)
		//IL_0076: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		//IL_0092: Unknown result type (might be due to invalid IL or missing references)
		//IL_0097: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)PlayerReverbFilter == (Object)null && (Object)(object)Camera.main != (Object)null)
		{
			PlayerReverbFilter = ((Component)((Component)Camera.main).transform).GetComponent<AudioReverbFilter>();
		}
		if ((Object)(object)Kris == (Object)null)
		{
			Kris = Object.FindFirstObjectByType<PlayerManager>();
		}
		if ((Object)(object)LWMenu == (Object)null)
		{
			LWMenu = Object.FindFirstObjectByType<LightworldMenu>();
		}
		if (GonerMenuOpen)
		{
			SoulTransform.localPosition = Vector2.op_Implicit(Vector2.Lerp(Vector2.op_Implicit(SoulTransform.localPosition), TargetSoulPosition, SoulLerpSpeed * Time.unscaledDeltaTime));
			MenuUpdate();
		}
		else
		{
			SoulTransform.position = Vector2.op_Implicit(Vector2.one * -500f);
		}
		RestartBattleOption.SetActive(BattleSystem.CurrentlyInBattle);
		if (Input.GetKeyDown(PlayerInput.Instance.Key_Pause) && CanOpenGonerMenu)
		{
			if (!GonerMenuOpen)
			{
				PauseGame();
			}
			else
			{
				UnpauseGame();
			}
		}
	}

	private void MenuUpdate()
	{
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0518: Unknown result type (might be due to invalid IL or missing references)
		//IL_0535: Unknown result type (might be due to invalid IL or missing references)
		//IL_053f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0544: Unknown result type (might be due to invalid IL or missing references)
		//IL_055c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0579: Unknown result type (might be due to invalid IL or missing references)
		//IL_0583: Unknown result type (might be due to invalid IL or missing references)
		//IL_0588: Unknown result type (might be due to invalid IL or missing references)
		//IL_0597: Unknown result type (might be due to invalid IL or missing references)
		//IL_0344: Unknown result type (might be due to invalid IL or missing references)
		//IL_0361: Unknown result type (might be due to invalid IL or missing references)
		//IL_036b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0370: Unknown result type (might be due to invalid IL or missing references)
		//IL_0388: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_03af: Unknown result type (might be due to invalid IL or missing references)
		//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0676: Unknown result type (might be due to invalid IL or missing references)
		//IL_067b: Unknown result type (might be due to invalid IL or missing references)
		//IL_046b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0470: Unknown result type (might be due to invalid IL or missing references)
		//IL_064a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0635: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: Unknown result type (might be due to invalid IL or missing references)
		//IL_0161: Unknown result type (might be due to invalid IL or missing references)
		//IL_016b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0170: Unknown result type (might be due to invalid IL or missing references)
		//IL_04a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0492: Unknown result type (might be due to invalid IL or missing references)
		//IL_04d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_04db: Unknown result type (might be due to invalid IL or missing references)
		//IL_042b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0430: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01de: Unknown result type (might be due to invalid IL or missing references)
		//IL_0255: Unknown result type (might be due to invalid IL or missing references)
		//IL_0224: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
		if (!UseHorizontalControls)
		{
			if (Input.GetKeyDown(PlayerInput.Instance.Key_Down))
			{
				CurrentCursorPosition++;
			}
			if (Input.GetKeyDown(PlayerInput.Instance.Key_Up))
			{
				CurrentCursorPosition--;
			}
		}
		else
		{
			if (Input.GetKeyDown(PlayerInput.Instance.Key_Right))
			{
				CurrentCursorPosition++;
			}
			if (Input.GetKeyDown(PlayerInput.Instance.Key_Left))
			{
				CurrentCursorPosition--;
			}
		}
		CurrentCursorPosition = Mathf.Clamp(CurrentCursorPosition, CurrentCursorMin, CurrentCursorMax);
		switch (CurrentMenuState)
		{
		case "Options":
			XReturnDebounce = false;
			HasRanXReturnDebounce = false;
			SettingsMenu.SettingsMenuOpen = true;
			((Component)SettingsMenu).gameObject.SetActive(true);
			break;
		case "Default":
		{
			CurrentCursorMin = 0;
			if (BattleSystem.CurrentlyInBattle)
			{
				CurrentCursorMax = 3;
			}
			else
			{
				CurrentCursorMax = 2;
			}
			UseHorizontalControls = false;
			TargetSoulPosition = new Vector2(BaseMenuOptions[CurrentCursorPosition].localPosition.x - 500f, BaseMenuOptions[CurrentCursorPosition].localPosition.y);
			if (!HasRanXReturnDebounce && !XReturnDebounce)
			{
				((MonoBehaviour)this).StartCoroutine(XReturn());
				HasRanXReturnDebounce = true;
			}
			((Component)SettingsMenu).gameObject.SetActive(false);
			ReturnWarningMenu.position = Vector2.op_Implicit(new Vector2(645f, 5760f));
			RestartWarningMenu.position = Vector2.op_Implicit(new Vector2(645f, 5760f));
			for (int k = 0; k < BaseMenuOptions.Length; k++)
			{
				if (k == CurrentCursorPosition)
				{
					((Graphic)BaseMenuTexts[k]).color = Color.yellow;
					((TMP_Text)BaseMenuTexts[k]).fontSharedMaterial = SelectedGonerMaterial;
				}
				else
				{
					((Graphic)BaseMenuTexts[k]).color = Color.white;
					((TMP_Text)BaseMenuTexts[k]).fontSharedMaterial = UnselectedGonerMaterial;
				}
			}
			if (Input.GetKeyDown(PlayerInput.Instance.Key_Confirm))
			{
				GonerMenuSource.PlayOneShot(GonerMenuClips[1]);
				switch (CurrentCursorPosition)
				{
				case 0:
					UnpauseGame();
					CurrentMenuState = "Default";
					break;
				case 1:
					CurrentCursorPosition = 0;
					CurrentMenuState = "Options";
					break;
				case 2:
					CurrentMenuState = "ReturnWarning";
					CurrentCursorPosition = 1;
					break;
				case 3:
					CurrentMenuState = "RestartBattleWarning";
					CurrentCursorPosition = 1;
					break;
				}
			}
			if (Input.GetKeyDown(PlayerInput.Instance.Key_Cancel) && XReturnDebounce)
			{
				UnpauseGame();
				CurrentMenuState = "Default";
			}
			break;
		}
		case "RestartBattleWarning":
		{
			XReturnDebounce = false;
			HasRanXReturnDebounce = false;
			bool flag = false;
			CurrentCursorMin = 0;
			CurrentCursorMax = 1;
			UseHorizontalControls = true;
			TargetSoulPosition = new Vector2(RestartWarningOptions[CurrentCursorPosition].localPosition.x - 80f, RestartWarningOptions[CurrentCursorPosition].localPosition.y);
			SoulTransform.localPosition = Vector2.op_Implicit(new Vector2(RestartWarningOptions[CurrentCursorPosition].localPosition.x - 80f, RestartWarningOptions[CurrentCursorPosition].localPosition.y));
			if (Input.GetKeyDown(PlayerInput.Instance.Key_Confirm))
			{
				GonerMenuSource.PlayOneShot(GonerMenuClips[1]);
				switch (CurrentCursorPosition)
				{
				case 1:
					CurrentMenuState = "Default";
					if (BattleSystem.CurrentlyInBattle)
					{
						CurrentCursorMax = 3;
						CurrentCursorPosition = 3;
						flag = true;
						RestartWarningMenu.position = Vector2.op_Implicit(new Vector2(645f, 5760f));
					}
					else
					{
						CurrentCursorMax = 2;
						CurrentCursorPosition = 2;
					}
					break;
				case 0:
					((MonoBehaviour)this).StartCoroutine(Delay_RestartBattle());
					flag = true;
					RestartWarningMenu.position = Vector2.op_Implicit(new Vector2(645f, 5760f));
					break;
				}
			}
			for (int j = 0; j < RestartWarningOptions.Length; j++)
			{
				if (j == CurrentCursorPosition)
				{
					((Graphic)RestartWarningText[j]).color = Color.yellow;
				}
				else
				{
					((Graphic)RestartWarningText[j]).color = Color.white;
				}
			}
			if (!flag)
			{
				RestartWarningMenu.position = Vector2.op_Implicit(new Vector2(645f, 480f));
			}
			break;
		}
		case "ReturnWarning":
		{
			XReturnDebounce = false;
			HasRanXReturnDebounce = false;
			CurrentCursorMin = 0;
			CurrentCursorMax = 1;
			UseHorizontalControls = true;
			TargetSoulPosition = new Vector2(ReturnWarningOptions[CurrentCursorPosition].localPosition.x - 80f, ReturnWarningOptions[CurrentCursorPosition].localPosition.y);
			SoulTransform.localPosition = Vector2.op_Implicit(new Vector2(ReturnWarningOptions[CurrentCursorPosition].localPosition.x - 80f, ReturnWarningOptions[CurrentCursorPosition].localPosition.y));
			if (Input.GetKeyDown(PlayerInput.Instance.Key_Confirm))
			{
				GonerMenuSource.PlayOneShot(GonerMenuClips[1]);
				switch (CurrentCursorPosition)
				{
				case 1:
					CurrentMenuState = "Default";
					if (BattleSystem.CurrentlyInBattle)
					{
						CurrentCursorMax = 3;
						CurrentCursorPosition = 2;
					}
					else
					{
						CurrentCursorMax = 2;
						CurrentCursorPosition = 2;
					}
					break;
				case 0:
					UI_LoadingIcon.ToggleLoadingIcon(showIcon: true);
					UI_FADE.Instance.StartFadeIn(2, 1f, UnpauseOnEnd: true, NewMainMenuManager.MainMenuStates.Hypothetical);
					CurrentActiveHypothesis = null;
					ResetPlayer();
					break;
				}
			}
			for (int i = 0; i < ReturnWarningOptions.Length; i++)
			{
				if (i == CurrentCursorPosition)
				{
					((Graphic)ReturnWarningText[i]).color = Color.yellow;
				}
				else
				{
					((Graphic)ReturnWarningText[i]).color = Color.white;
				}
			}
			ReturnWarningMenu.position = Vector2.op_Implicit(new Vector2(645f, 480f));
			break;
		}
		}
	}

	private IEnumerator Delay_RestartBattle()
	{
		UI_FADE.Instance.StartFadeIn(-1, 3f);
		Battle storedBattle = BattleSystem.Instance.CurrentBattle;
		UnpauseGame();
		BattleSystem.EndBattle(BattleSystem.EndBattleTypes.Instant);
		BattleSystem.OpenBottomBarWindow(BattleSystem.BottomBarWindows.None);
		BattleSystem.BattleChatbox.TextVisible = true;
		foreach (ActivePartyMember activePartyMember in PartyMemberSystem.Instance.ActivePartyMembers)
		{
			activePartyMember.CurrentHealth = activePartyMember.PartyMemberDescription.MaximumHealth;
		}
		yield return (object)new WaitForSeconds(0.1f);
		BattleSystem.StartBattle(storedBattle, Vector2.op_Implicit(((Component)CameraManager.instance).transform.position), SkipIntro: true);
	}

	public void PauseGame()
	{
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)PlayerReverbFilter != (Object)null)
		{
			PreviousPreset = PlayerReverbFilter.reverbPreset;
			PlayerReverbFilter.reverbPreset = (AudioReverbPreset)9;
		}
		GonerMenuAnimator.Play("GonerMenu_Open");
		((MonoBehaviour)ChatboxManager).StartCoroutine(ChatboxManager.Instance.InputDebounceDelay());
		PreviousChatboxInputState = ChatboxManager.AllowInput;
		ChatboxManager.AllowInput = false;
		((Behaviour)CMenu_SoulIcon).enabled = false;
		Vector3 position = Camera.main.WorldToScreenPoint(((Component)Kris).transform.position);
		SoulTransform.position = position;
		((Graphic)CurrentQuestsText).color = Color.white;
		if ((Object)(object)CurrentActiveHypothesis != (Object)null)
		{
			((TMP_Text)CurrentQuestsText).text = "";
			HypothesisGoal[] hypothesisGoals = CurrentActiveHypothesis.HypothesisGoals;
			foreach (HypothesisGoal hypothesisGoal in hypothesisGoals)
			{
				int num = PlayerPrefs.GetInt("HypothesisGoal_" + hypothesisGoal.GoalPlayprefName, 0);
				if (hypothesisGoal.RequiredTasks > 1)
				{
					if (num < hypothesisGoal.RequiredTasks)
					{
						TextMeshProUGUI currentQuestsText = CurrentQuestsText;
						((TMP_Text)currentQuestsText).text = ((TMP_Text)currentQuestsText).text + "<color=white>" + hypothesisGoal.GoalHint + " (" + num + "/" + hypothesisGoal.RequiredTasks + ")</color>\n";
					}
					else
					{
						TextMeshProUGUI currentQuestsText2 = CurrentQuestsText;
						((TMP_Text)currentQuestsText2).text = ((TMP_Text)currentQuestsText2).text + "<color=yellow>" + hypothesisGoal.GoalHint + " (" + num + "/" + hypothesisGoal.RequiredTasks + ")</color>\n";
					}
				}
				else if (num != 0)
				{
					TextMeshProUGUI currentQuestsText3 = CurrentQuestsText;
					((TMP_Text)currentQuestsText3).text = ((TMP_Text)currentQuestsText3).text + "<color=yellow>" + hypothesisGoal.GoalHint + " (X)</color>\n";
				}
				else
				{
					TextMeshProUGUI currentQuestsText4 = CurrentQuestsText;
					((TMP_Text)currentQuestsText4).text = ((TMP_Text)currentQuestsText4).text + "<color=white>" + hypothesisGoal.GoalHint + " (-)</color>\n";
				}
			}
		}
		else
		{
			((TMP_Text)CurrentQuestsText).text = "";
		}
		PreviousAnimationState = Kris._PMove.FreezeAnimation;
		Kris._PMove.FreezeAnimation = true;
		GonerMenuOpen = true;
		PreviousMusicVolume = MusicManager.Instance.source.volume;
		MusicManager.Instance.source.volume = 0.1f;
		((Behaviour)((Component)GameMusic).GetComponent<AudioLowPassFilter>()).enabled = true;
		PreviousLWMenuInputState = LWMenu.AllowInput;
		LWMenu.AllowInput = false;
		PreviousPlayerInteractionState = Kris._PInteract.CanInteract;
		Kris._PInteract.CanInteract = false;
		Time.timeScale = 0f;
	}

	public void Pause_OpenOptionMenu()
	{
		PauseGame();
		CurrentMenuState = "Options";
	}

	public void ResetPlayer()
	{
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		ChatboxManager.EndText();
		ChatboxManager.AllowInput = true;
		BattleSystem.EndBattle(BattleSystem.EndBattleTypes.Instant);
		((Behaviour)((Component)((Component)PlayerManager.Instance).transform).GetComponent<Collider2D>()).enabled = true;
		((Component)((Component)PlayerManager.Instance).transform).GetComponent<Rigidbody2D>().simulated = true;
		((Component)PlayerManager.Instance).GetComponentInChildren<SpriteRenderer>().color = Color.white;
		((Renderer)((Component)PlayerManager.Instance).GetComponentInChildren<SpriteRenderer>()).enabled = true;
		PlayerManager.Instance._PAnimation.FootstepsEnabled = false;
		PlayerManager.Instance._PMove.AnimationOverriden = false;
		PlayerManager.Instance._PInteract.CanInteract = true;
		PlayerManager.Instance._PMove.AllowSprint = true;
		MusicManager.Instance.source.loop = true;
		MusicManager.Instance.source.volume = 0.65f;
		MusicManager.Instance.source.pitch = 1f;
		LightworldMenu.Instance.CanOpenMenu = true;
		LightworldMenu.Instance.AllowInput = true;
		DarkworldMenu.Instance.CanOpenMenu = true;
		if (PlayerManager.Instance._PMove.InDarkworld)
		{
			((Component)PlayerManager.Instance._PAnimation).GetComponent<Animator>().runtimeAnimatorController = DefaultDarkworldKrisRuntimeController;
			((Component)PlayerManager.Instance._PAnimation).GetComponent<Animator>().Play("DARKWORLD_KRIS_IDLE");
		}
		else
		{
			((Component)PlayerManager.Instance._PAnimation).GetComponent<Animator>().runtimeAnimatorController = DefaultLightworldKrisRuntimeController;
			((Component)PlayerManager.Instance._PAnimation).GetComponent<Animator>().Play("OVERWORLD_NOELLE_IDLE");
		}
	}

	public void UnpauseGame()
	{
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
		CurrentMenuState = "Default";
		((MonoBehaviour)this).StartCoroutine(InformPreviousClosure());
		SettingsMenu.SettingsMenuOpen = true;
		((Component)SettingsMenu).gameObject.SetActive(false);
		ReturnWarningMenu.position = Vector2.op_Implicit(new Vector2(645f, 5760f));
		RestartWarningMenu.position = Vector2.op_Implicit(new Vector2(645f, 5760f));
		GonerMenuAnimator.Play("GonerMenu_Close");
		((Behaviour)CMenu_SoulIcon).enabled = true;
		GonerMenuOpen = false;
		Kris._PMove.FreezeAnimation = PreviousAnimationState;
		ChatboxManager.AllowInput = PreviousChatboxInputState;
		CutsceneUtils.FadeOutText(CurrentQuestsText, 4f);
		MusicManager.Instance.source.volume = PreviousMusicVolume;
		if ((Object)(object)PlayerReverbFilter != (Object)null)
		{
			PlayerReverbFilter.reverbPreset = PreviousPreset;
		}
		((Behaviour)((Component)GameMusic).GetComponent<AudioLowPassFilter>()).enabled = false;
		LWMenu.AllowInput = PreviousLWMenuInputState;
		Kris._PInteract.CanInteract = PreviousPlayerInteractionState;
		Time.timeScale = 1f;
	}

	private IEnumerator XReturn()
	{
		yield return (object)new WaitForSeconds(0f);
		XReturnDebounce = true;
	}

	private IEnumerator InformPreviousClosure()
	{
		gonerMenuWasOpen = true;
		yield return (object)new WaitForSeconds(0.1f);
		gonerMenuWasOpen = false;
	}

	public void ShowTip(string tip)
	{
		((TMP_Text)TipText).text = "小贴士！" + tip;
		((Component)TipText).GetComponent<Animator>().Play("GonerMenu_Tip", -1, 0f);
	}

	public void ShowMusicCredit(string songName, string Credit)
	{
		((TMP_Text)MusicText).text = "<scale=0.5> </scale>~ " + songName + " ~ " + Credit;
		((Component)MusicText).GetComponent<Animator>().Play("GonerMenu_Music", -1, 0f);
	}

	public void ShowCashGain(float moneyGain)
	{
		((TMP_Text)CashText).text = $"+${moneyGain}";
		((Component)CashText).GetComponent<Animator>().Play("GonerMenu_Cash", -1, 0f);
		CutsceneUtils.PlaySound(CashgainSFX, CutsceneUtils.DRH_MixerChannels.Effect, 0.4f, Random.Range(0.9f, 1.1f));
	}
}
